Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: anyOf/oneOf missing properties for intersection/inheritance #5930

Merged
merged 4 commits into from
Dec 24, 2024

Conversation

vipentti
Copy link
Contributor

This adds these scenarios as specific cases in KiotaBuilder.CreateModelDeclarations. Not sure if this is the best place to handle this but at least this fixes the issue where the properties & possible inheritance were completely missing while not breaking anything existing.

Fixes #5921

@vipentti vipentti requested a review from a team as a code owner December 22, 2024 06:39
@vipentti
Copy link
Contributor Author

@microsoft-github-policy-service agree

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!
This is great work!
I think that once we have a few additional unit tests, we should be good to merge this.

@vipentti vipentti force-pushed the fix/single-one-of-all-of-merge branch from 9956de6 to bb00147 Compare December 23, 2024 14:56
baywet
baywet previously approved these changes Dec 24, 2024
Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making the changes!

@baywet baywet enabled auto-merge December 24, 2024 11:41
auto-merge was automatically disabled December 24, 2024 14:53

Head branch was pushed to by a user without write access

@vipentti vipentti force-pushed the fix/single-one-of-all-of-merge branch from bb00147 to 5094aaa Compare December 24, 2024 14:53
@vipentti
Copy link
Contributor Author

Looks like there were some formatting issues which caused the build to fail, I have now fixed those.

For some reason the OpenApiSchemaExtensionsTests did not report any issues locally when running dotnet format --verify-no-changes but I assume it might be because of the collection expressions preferring newlines before brackets & braces because the examples I copied had worked previously.

@baywet baywet enabled auto-merge December 24, 2024 14:58
@baywet baywet merged commit 022480d into microsoft:main Dec 24, 2024
228 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants